package com.td.library.data;

import com.td.library.config.FileType;

import java.io.File;

/**
 * 文件数据类
 */
public class FileData {
    private boolean checked;
    private String path;
    private String name;
    private FileType fileType;
    private DeviceData deviceData;

    public FileData(boolean checked, String path, String name, FileType fileType, DeviceData deviceData) {
        this.checked = checked;
        this.path = path;
        this.name = name;
        this.fileType = fileType;
        this.deviceData = deviceData;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public FileType getFileType() {
        return fileType;
    }

    public void setFileType(FileType fileType) {
        this.fileType = fileType;
    }

    public DeviceData getDeviceData() {
        return deviceData;
    }

    public void setDeviceData(DeviceData deviceData) {
        this.deviceData = deviceData;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取绝对路径
     *
     * @return 绝对路径
     */
    public String getAbsolutePath() {
        return path + File.separator + name;
    }
}
